package cdu.hjx.project.sys.mapper;

import cdu.hjx.project.pojo.Dict;
import cdu.hjx.project.pojo.DictDetail;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DictMapper {

    // 添加字典
    int addDict(Dict dict) throws Exception;

    // 查询字典
    Dict findDict(String dname) throws Exception;

    //查询所有字典信息
    List<Dict> dicts() throws Exception;

    //根据字典id查字典信息
    Dict findDictById(Integer id) throws Exception;

    //修改字典信息
    int updateDict(Dict dict) throws Exception;

    //删除字典信息
    int deleteDict(Integer id) throws Exception;

    //显示列表信息
    List<DictDetail> list(String dtype) throws Exception;
}
